# -*- mode: snippet -*-
# name: shiny-observe-event-group
# key: shiny-observe-event-group
# condition : (string= ess-dialect "R")
# --
observeEvent(eventExpr = input$reset, handlerExpr = {

  updateCheckboxGroupButtons(
    session  = session,
    inputId  = "checkbox_category_1",
    selected = unique(processed_data_tbl$category_1))

  updatePickerInput(
    session = session,
    inputId = "picker_category_2",
    selected = unique(processed_data_tbl$category_2))

  updateDateRangeInput(
    session = session,
    inputId = "date_range",
    start   = min(processed_data_tbl$order.date),
    end     = max(processed_data_tbl$order.date))

  updateRadioGroupButtons(
    session = session,
    inputId = "time_unit",
    selected = "month"
  )